import React, { useMemo } from 'react'
function ChildComponent({ name, children }) {
  function changeXiaoHong(name) {
      console.log('xiaolong, child');
      return (name + 'xiaohong go ')
  }
  const action = useMemo(()=>{return changeXiaoHong(name)}, [name])
  return <div>
      <div>{action}</div>
      <div>{children}</div>
  </div>
}
export default ChildComponent
